<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>SIGPLAN</title>

  <!-- Framework CSS -->
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/blueprint/screen.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/blueprint/print.css" type="text/css" media="print" />
    
  <!-- Site Specific CSS -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/theme.css" type="text/css" media="screen, projection" />    
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/prettyPhoto.css" type="text/css" media="screen, projection" />
    
  <!--[if IE 6]><link rel="stylesheet" href="css/blueprint/ie6.css" type="text/css" media="screen, projection"><![endif]-->
  <!--[if IE 7]><link rel="stylesheet" href="css/blueprint/ie7.css" type="text/css" media="screen, projection"><![endif]-->
    
	
  <!-- Import buttons plugin  -->
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/blueprint/plugins/buttons/screen.css" type="text/css" media="screen, projection" />
    
  <!-- Import link-icons plugin -->
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection" />
    
  <!-- Javascript -->
    
        
  <!-- Lightbox Plugin -->  
    
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.prettyPhoto.js"></script>
    
  <!-- Yetii Tab Interface -->
  
  	<script type="text/javascript" src="${pageContext.request.contextPath}/js/yetii-min.js"></script>
    
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" type="text/css" />
    <script src="${pageContext.request.contextPath}/js/jquery-latest.js"></script>
    
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon" />
	
	<script type="text/javascript">
   
			
    function erro () {
    	$("#erros").show("slow");
    }

    function erroD (id) {
    	$("#"+id).show("slow");
    }


    function openAjax() {
    	var ajax;
    	try {
    		ajax = new XMLHttpRequest();
    	} catch(ee) {
    		try {
    			ajax = new ActiveXObject("Msxml2.XMLHTTP");
    		} catch(e) {
    			try {
    				ajax = new ActiveXObject("Microsoft.XMLHTTP");
    			} catch(E) {
    				ajax = false;
    			}
    		}
    	}
    	return ajax;
    }

    

    function loadFunctions() {
    	focusNome();
    	ativarBtnCadastro();
    	ativarBtnEditarBtnExcluir();
    }

    function gE(ID) {
    	return document.getElementById(ID);
    }

    function gEs(tag) {
    	return document.getElementsByTagName(tag);
    }
    function verificaErro() {	   	
    		
    		// Inicia o Ajax, atrav�s da vari�vel Ajax
    		var ajax = openAjax();
    		// A tag bgBody conter� o formul�rio de cadastro
    		var recipiente = gE('erros');
    		// Informamos o m�todo e a p�gina que ser� requisitada
    		ajax.open('POST', 'teste', true); 
    		ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    		
    		// bla
    		ajax.onreadystatechange = function() {
    			if (ajax.readyState == 1) {
    				// Cria o efeito de loading
    				
    			} // if->readyState->1
    			if (ajax.readyState == 4) {
    				if (ajax.status == 200) {
    					// Remove o efeito de loading
    					
    					// Pega o conte�do - HTML - da p�gina requisitada: formulario.php?ajax=true e coloca dentra da div definida na vari�vel recipiente
    					erro ();		    					
    					
    					 $("#erros").append(ajax.responseText);
    					
    					// Chama a fun��o que trabalha sobre os bot�es de Ok e Cancelar
    					
    					// Seta o focus no campo nome do cadastro
    					
    				} // if-status->200
    			} // if->readyState->4
    		} // ajax->onreadystatechange
    		// Envia a requisi��o
    		var dataPost = 'amor=' + gE('amor').value;
    		 
			ajax.send(dataPost);
    		// Evita o reload da p�gina
    		return false;
    	}
    
    // Esta fun��o � utilizada para exibir o formul�rio quando o link/bot�o Cadastrar novo contato � clicado
    
    

       function getPageSize(){
    	
    	var xScroll, yScroll;
    	
    	if (window.innerHeight && window.scrollMaxY) {	
    		xScroll = document.body.scrollWidth;
    		yScroll = window.innerHeight + window.scrollMaxY;
    	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
    		xScroll = document.body.scrollWidth;
    		yScroll = document.body.scrollHeight;
    	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
    		xScroll = document.body.offsetWidth;
    		yScroll = document.body.offsetHeight;
    	}
    	
    	var windowWidth, windowHeight;
    	if (self.innerHeight) {	// all except Explorer
    		windowWidth = self.innerWidth;
    		windowHeight = self.innerHeight;
    	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
    		windowWidth = document.documentElement.clientWidth;
    		windowHeight = document.documentElement.clientHeight;
    	} else if (document.body) { // other Explorers
    		windowWidth = document.body.clientWidth;
    		windowHeight = document.body.clientHeight;
    	}	
    	
    	// for small pages with total height less then height of the viewport
    	if(yScroll < windowHeight){
    		pageHeight = windowHeight;
    	} else { 
    		pageHeight = yScroll;
    	}

    	// for small pages with total width less then width of the viewport
    	if(xScroll < windowWidth){	
    		pageWidth = windowWidth;
    	} else {
    		pageWidth = xScroll;
    	}

    	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 

    }
</script>